let id = localStorage.getItem('id')
let scrollIndex = 5;

creatSwiper()
function creatSwiper() {
  let mySwiper = new Swiper('.swiperLeft', {
    loop: true, // 循环模式选项
    autoplay: {
      disableOnInteraction: false,
    },
    // 如果需要分页器
    effect: 'fade',
    delay: 2000,
    pagination: {
      el: '.swiper-pagination',
    },

    // 如果需要前进后退按钮
    navigation: {
      nextEl: '.swiper-button-next',
      prevEl: '.swiper-button-prev',
    },

    // 如果需要滚动条
    scrollbar: {
      el: '.swiper-scrollbar',
    },
  })

  for (let i = 0; i < mySwiper.pagination.bullets.length; i++) {
    mySwiper.pagination.bullets[i].index = i + 1
    mySwiper.pagination.bullets[i].onmouseover = function () {
      mySwiper.slideTo(this.index)
    }
  }
}
creatSwiper2()
function creatSwiper2() {
  let mySwiper = new Swiper('.swiperRight', {
    loop: true, // 循环模式选项
    autoplay: {
      disableOnInteraction: false,
    },
    // 如果需要分页器
    effect: 'fade',
    delay: 3000,

    // 如果需要前进后退按钮
    navigation: {
      nextEl: '.swiper-button-next',
      prevEl: '.swiper-button-prev',
    },
    // 如果需要滚动条
    scrollbar: {
      el: '.swiper-scrollbar',
    },
  })
  let comtainer = document.querySelector('.swiperRight');
  comtainer.onmouseenter = function () {
    $('.swiperRightBtn').show()
  };
  comtainer.onmouseleave = function () {
    $('.swiperRightBtn').hide()
  }

}

creatSwiper3()
function creatSwiper3() {
  let mySwiper = new Swiper('.main-top-box-swiper', {
    loop: true, // 循环模式选项
    autoplay: {
      disableOnInteraction: false,
    },
    // 如果需要分页器
    delay: 2000,

    // 如果需要前进后退按钮
    navigation: {
      nextEl: '.swiper-button-next',
      prevEl: '.swiper-button-prev',
    },
    // 如果需要滚动条
    scrollbar: {
      el: '.swiper-scrollbar',
    },
  })

}


